#include <bits/stdc++.h>
using namespace std;
int n,m,a[100005],c[100005];
int main()
{
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    cin >> n >> m;
    cout << (m+n)*7;
}
